package com.ruoyi.web.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.mapper.GuTagMapper;
import com.ruoyi.web.domain.GuTag;
import com.ruoyi.web.service.IGuTagService;

/**
 * 标签Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-15
 */
@Service
public class GuTagServiceImpl implements IGuTagService 
{
    @Autowired
    private GuTagMapper guTagMapper;

    /**
     * 查询标签
     * 
     * @param id 标签主键
     * @return 标签
     */
    @Override
    public GuTag selectGuTagById(Long id)
    {
        return guTagMapper.selectGuTagById(id);
    }

    /**
     * 查询标签列表
     * 
     * @param guTag 标签
     * @return 标签
     */
    @Override
    public List<GuTag> selectGuTagList(GuTag guTag)
    {
        return guTagMapper.selectGuTagList(guTag);
    }

    /**
     * 新增标签
     * 
     * @param guTag 标签
     * @return 结果
     */
    @Override
    public int insertGuTag(GuTag guTag)
    {
        guTag.setCreateTime(DateUtils.getNowDate());
        return guTagMapper.insertGuTag(guTag);
    }

    /**
     * 修改标签
     * 
     * @param guTag 标签
     * @return 结果
     */
    @Override
    public int updateGuTag(GuTag guTag)
    {
        guTag.setUpdateTime(DateUtils.getNowDate());
        return guTagMapper.updateGuTag(guTag);
    }

    /**
     * 批量删除标签
     * 
     * @param ids 需要删除的标签主键
     * @return 结果
     */
    @Override
    public int deleteGuTagByIds(Long[] ids)
    {
        return guTagMapper.deleteGuTagByIds(ids);
    }

    /**
     * 删除标签信息
     * 
     * @param id 标签主键
     * @return 结果
     */
    @Override
    public int deleteGuTagById(Long id)
    {
        return guTagMapper.deleteGuTagById(id);
    }

    @Override
    public List<GuTag> selectGuTagListAll() {
        return guTagMapper.selectGuTagListAll();
    }
}
